//
//  ViewController.m
//  ZZNews
//
//  Created by 周英培 on 16/7/27.
//  Copyright © 2016年 周英培. All rights reserved.
//

#define KWIDTH [UIScreen mainScreen].bounds.size.width
#define KHEIGHT [UIScreen mainScreen].bounds.size.height

#import "ViewController.h"
#import "ZZNewsChannelCollectionView.h"
#import "ZZMainNewsCollectionView.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //MARK:新闻主界面
    UICollectionViewFlowLayout *flowLayout1 = [[UICollectionViewFlowLayout alloc] init];
    
    flowLayout1.itemSize = CGSizeMake(KWIDTH, KHEIGHT - 55);
    
    flowLayout1.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    
    ZZMainNewsCollectionView *mainNewsCollectionView = [[ZZMainNewsCollectionView alloc] initWithFrame:CGRectMake(0, 55, KWIDTH, KHEIGHT - 55) collectionViewLayout:flowLayout1];
    
    flowLayout1.minimumLineSpacing = 0;
    
    flowLayout1.minimumInteritemSpacing = 0;
    
    [self.view addSubview:mainNewsCollectionView];
    
    //MARK:加载新闻频道栏
    UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
    
//    flowLayout.itemSize = CGSizeMake(80, 30);
    
    flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    
    flowLayout.sectionInset = UIEdgeInsetsMake(0, 10, 0, 10);
    
    ZZNewsChannelCollectionView *newsChannelCollectionView = [[ZZNewsChannelCollectionView alloc] initWithFrame:CGRectMake(0, 20, KWIDTH, 35) collectionViewLayout:flowLayout];
    
    [self.view addSubview:newsChannelCollectionView];
}

- (UIStatusBarStyle)preferredStatusBarStyle {

    return UIStatusBarStyleLightContent;

}

@end
